package org.example.system;

import org.example.model.MachineState.IdleState;
import org.example.model.MachineState.WorkingState;

public class Harvester extends FarmMachine {
    public Harvester(String id) {
        super(id);
        System.out.println("创建收割机: " + id);
    }

    public void startTask(String task) {
        setState(new WorkingState());
        System.out.println("开始收割作业: " + task);
    }

    public void stopTask() {
        setState(new IdleState());
        System.out.println("停止收割作业");
    }
}